cd "directory"

use "merge_zip_year_final.dta", clear

label var sales_EV0 "EV Sales"
label var sales_electric0 "BEV Sales"
label var sales_PHEV0 "PHEV Sales"
label var sales_hydrogen0 "FCEV Sales"
label var ownership "Vehicle Ownership"
label var ownership_EV "EV Ownership"
label var ownership_electric "BEV Ownership"
label var ownership_PHEV "PHEV Ownership"
label var ownership_hydrogen "FCEV Ownership" 
label var ownership_hybrid "Hybrid Vehicle Ownership"
label var ownership_nonEV "Non-Electric Vehicle Ownership"
label var count "Solar Installation"
label var cum_count "Existing Solar"
label var cum_area "Existing Solar Capacity"
label var ghi "GHI"
label var hov_length "HOV Lane Length"
label var pop "Population"
label var male "Male"
label var white "White"
label var age "Median Age"
label var income_median "Median Income"
label var highschool_more "Aged 25+ w/ High School Diploma"
label var station "EV Charging Stations"
label var price_gasoline "Gasoline Price"
label var NSC_rate "NSC Rate"

replace utility = "SDGE" if zcta == 92135 | zcta == 92140
replace utility = "SCE" if zcta == 92242 | zcta == 92278 | zcta == 92280 | zcta == 92304 | zcta == 92322 | zcta == 92338 | zcta == 93042 | zcta == 93043 | zcta == 93220 | zcta == 93522 | zcta == 93524 | zcta == 93545 | zcta == 93549 | zcta == 93592  
replace utility = "PGE" if zcta == 93437 | zcta == 93623 | zcta == 93628 | zcta == 93633 | zcta == 93943 | zcta == 94129 | zcta == 94130 | zcta == 94512 | zcta == 94592 | zcta == 94613 | zcta ==94720 | zcta == 95211 | zcta == 95234 | zcta == 95335 | zcta == 95471 | zcta == 95537 | zcta == 95545 | zcta == 95550 | zcta == 95715 | zcta == 95910 | zcta == 95923 | zcta == 95944 | zcta == 95981 | zcta == 95986 | zcta == 96061 | zcta == 96071 | zcta == 96155 

foreach var in EV electric PHEV hydrogen {
gen scratch_`var'= sales_`var'0-sales_`var'
}

xtset zcta year
gen NSC_rate_1 = L.NSC_rate
gen NSC_rate_CPI_1 = L.NSC_rate_CPI

egen NSC_rate_median = median(NSC_rate_1)
gen NSC_rate_high = NSC_rate>= NSC_rate_median
egen NSC_rate_median_CPI = median(NSC_rate_CPI_1)
gen NSC_rate_high_CPI = NSC_rate_CPI>= NSC_rate_median_CPI

gen NSC_rate_cum_count = NSC_rate*cum_count
gen NSC_rate_ghi = NSC_rate*ghi
gen NSC_high_cum_count = NSC_rate_high*cum_count
gen NSC_high_ghi = NSC_rate_high*ghi

gen NSC_rate_cum_count_CPI = NSC_rate_CPI*cum_count
gen NSC_rate_ghi_CPI = NSC_rate_CPI*ghi
gen NSC_high_cum_count_CPI = NSC_rate_high_CPI*cum_count
gen NSC_high_ghi_CPI = NSC_rate_high_CPI*ghi

ihstrans sales_EV0 sales_electric0 sales_hydrogen0 sales_PHEV0 cum_count count area cum_area ownership_EV ownership_biodiesel ownership_diesel ownership_electric ownership_flexfuel ownership_gasoline ownership_hybrid ownership_hydrogen ownership_gas ownership_PHEV ownership_propane sales_biodiesel sales_diesel sales_electric sales_flexfuel sales_gasoline sales_hybrid sales_hydrogen sales_gas sales_PHEV sales_propane sales_EV ghi hov_length price_gasoline pop income_median
label var ihs_cum_count "IHS(Existing Solar)"
label var ihs_ownership_EV "IHS(EV Ownership)"
label var ihs_cum_area "IHS(Existing Solar Capacity)"
label var ihs_ghi "IHS(GHI)"
label var ihs_hov_length "IHS(HOV Lane Length)"
label var ihs_price_gasoline "IHS(Gasoline Price)"

foreach var in sales_EV0 sales_electric0 sales_hydrogen0 sales_PHEV0 cum_count count area cum_area ownership_EV ownership_biodiesel ownership_diesel ownership_electric ownership_flexfuel ownership_gasoline ownership_hybrid ownership_hydrogen ownership_gas ownership_PHEV ownership_propane sales_biodiesel sales_diesel sales_electric sales_flexfuel sales_gasoline sales_hybrid sales_hydrogen sales_gas sales_PHEV sales_propane sales_EV ghi hov_length price_gasoline pop income_median {
gen log_`var' = log(`var' + 1)
}
label var log_cum_count "log(Existing Solar)"
label var log_ownership_EV "log(EV Ownership)"
label var log_cum_area "log(Existing Solar Capacity)"
label var log_ghi "log(GHI)"
label var log_hov_length "log(HOV Lane Length)"
label var log_price_gasoline "log(Gasoline Price)"

egen county_year  = group(fips year)

cd "results"

/*Table 2*/

set matsize 10000
qui outreg2 using summary_solar_2022, replace tex(frag) sum(log) label keep(count cum_count area cum_area sales_EV0 sales_electric0 sales_PHEV0 ownership_EV ghi hov_length price_gasoline station NSC_rate income_median pop male white age highschool_more) sortvar(count cum_count area cum_area sales_EV0 sales_electric0 sales_PHEV0 ownership_EV ghi hov_length price_gasoline station NSC_rate income_median pop male white age highschool_more)

////////////////////////////////
///////////*PV on EV*///////////
////////////////////////////////

gen ghi_1 = L.ghi
replace ghi_1 = ghi if year == 2011

/*Table 3*/
reghdfe sales_EV0 L.cum_count hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag, replace keep(L.cum_count) nocon label tex(frag) ct(OLS) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
reghdfe sales_EV0 L.cum_area hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag, append keep(L.cum_area) nocon label tex(frag) ct(OLS) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
reghdfe L.cum_count ghi_1 L.ghi_1 hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag, append keep(ghi_1 L.ghi_1) nocon label tex(frag) ct(First Stage) addtext(County-Year FEs, YES, ZCTA FEs, YES) 
reghdfe L.cum_area ghi_1 L.ghi_1 hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag, append keep(ghi_1 L.ghi_1) nocon label tex(frag) ct(First Stage) addtext(County-Year FEs, YES, ZCTA FEs, YES) 
ivreghdfe sales_EV0 (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag, append keep(L.cum_count) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_EV0 (L.cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag, append keep(L.cum_area) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)

/*Table B2*/

ivreghdfe sales_EV0 (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(fips)
outreg2 using result_solar_on_EV_lag_r, replace keep(L.cum_count) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_EV0 (L.cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(fips)
outreg2 using result_solar_on_EV_lag_r, append keep(L.cum_area) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_EV0 (L.cum_count = ghi_1 L.ghi_1), absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_r, append keep(L.cum_count) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_EV0 (L.cum_area = ghi_1 L.ghi_1), absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_r, append keep(L.cum_area) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_EV0 (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore L.hov_length L.price_gasoline L.station L.pop L.male L.age L.white L.highschool_more L.income_median L.income_15k L.income_25k L.income_35k L.income_50k L.income_75k L.income_100k L.income_150k L.income_200k L.income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_r, append keep(L.cum_count) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_EV0 (L.cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore L.hov_length L.price_gasoline L.station L.pop L.male L.age L.white L.highschool_more L.income_median L.income_15k L.income_25k L.income_35k L.income_50k L.income_75k L.income_100k L.income_150k L.income_200k L.income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_r, append keep(L.cum_area) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe log_sales_EV0 (L.log_cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_r, append keep(L.log_cum_count) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe log_sales_EV0 (L.log_cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_r, append keep(L.log_cum_area) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe ihs_sales_EV0 (L.ihs_cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_r, append keep(L.ihs_cum_count) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe ihs_sales_EV0 (L.ihs_cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_r, append keep(L.ihs_cum_area) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES)

/*Table B3*/

ivreghdfe sales_EV0 (L2.cum_count = L2.ghi L3.ghi) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_more, replace keep(L2.cum_count) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_EV0 (L2.cum_area = L2.ghi L3.ghi) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_more, append keep(L2.cum_area) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_EV0 (L3.cum_count = L3.ghi L4.ghi) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_more, append keep(L3.cum_count) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_EV0 (L3.cum_area = L3.ghi L4.ghi) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_more, append keep(L3.cum_area) nocon label tex(frag) ct(2SLS) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes

/*Table 4*/

ivreghdfe scratch_EV (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_change_lag, replace keep(L.cum_count) nocon label tex(frag) ct(EV Scrappage) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe scratch_EV (L.cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_change_lag, append keep(L.cum_area) nocon label tex(frag) ct(EV Scrappage) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_EV (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_change_lag, append keep(L.cum_count) nocon label tex(frag) ct(EV Ownership Change) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_EV (L.cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_change_lag, append keep(L.cum_area) nocon label tex(frag) ct(EV Ownership Change) addtext(County-Year FEs, YES, ZCTA FEs, YES)

/*Table 5*/

ivreghdfe sales_electric0 (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_type, replace keep(L.cum_count) nocon label tex(frag) ct(BEV) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_electric0 (L.cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_type, append keep(L.cum_area) nocon label tex(frag) ct(BEV) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_PHEV0 (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_type, append keep(L.cum_count) nocon label tex(frag) ct(PHEV) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_PHEV0 (L.cum_area = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_type, append keep(L.cum_area) nocon label tex(frag) ct(PHEV) addtext(County-Year FEs, YES, ZCTA FEs, YES)

/*Table 6*/

ivreghdfe sales_electric (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_other_lag, replace keep(L.cum_count) nocon label tex(frag) ct(BEV) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_PHEV (L.cum_count = ghi_1 L.ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_other_lag, append keep(L.cum_count) nocon label tex(frag) ct(PHEV) addtext(County-Year FEs, YES, ZCTA FEs, YES)
ivreghdfe sales_flexfuel (L.cum_count = ghi_1 L.ghi_1) hov_length station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_other_lag, append keep(L.cum_count) nocon label tex(frag) ct(FFV) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_hybrid (L.cum_count = ghi_1 L.ghi_1) hov_length station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_other_lag, append keep(L.cum_count) nocon label tex(frag) ct(Hybrid) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_gasoline (L.cum_count = ghi_1 L.ghi_1) hov_length station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_other_lag, append keep(L.cum_count) nocon label tex(frag) ct(Gasoline) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_diesel (L.cum_count = ghi_1 L.ghi_1) hov_length station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_other_lag, append keep(L.cum_count) nocon label tex(frag) ct(Diesel) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_gas (L.cum_count = ghi_1 L.ghi_1) hov_length station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_other_lag, append keep(L.cum_count) nocon label tex(frag) ct(Gas) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_propane (L.cum_count = ghi_1 L.ghi_1) hov_length station sales pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_other_lag, append keep(L.cum_count) nocon label tex(frag) ct(Propane) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes

/*Table 13*/

gen NSC_high_cum_area = NSC_rate_high_CPI*cum_area
gen NSC_high_ghi_1 = NSC_rate_high_CPI*ghi_1
gen NSC_rate_cum_area_CPI = NSC_rate_CPI*cum_area
gen NSC_rate_ghi_1_CPI = NSC_rate_CPI*ghi_1

ivreghdfe sales_EV0 (L.cum_count L.NSC_high_cum_count = ghi_1 L.ghi_1 NSC_high_ghi_1 L.NSC_high_ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore if NSC_rate_CPI_1 !=., absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_NSC_type, replace keep(L.cum_count L.NSC_high_cum_count) nocon label tex(frag) ct(EV Sales) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_EV0 (L.cum_area L.NSC_high_cum_area = ghi_1 L.ghi_1 NSC_high_ghi_1 L.NSC_high_ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore if NSC_rate_CPI_1 !=., absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_NSC_type, append keep(L.cum_area L.NSC_high_cum_area) nocon label tex(frag) ct(EV Sales) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_electric0 (L.cum_count L.NSC_high_cum_count = ghi_1 L.ghi_1 NSC_high_ghi_1 L.NSC_high_ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore if NSC_rate_CPI_1 !=., absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_NSC_type, append keep(L.cum_count L.NSC_high_cum_count) nocon label tex(frag) ct(BEV Sales) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_electric0 (L.cum_area L.NSC_high_cum_area = ghi_1 L.ghi_1 NSC_high_ghi_1 L.NSC_high_ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore if NSC_rate_CPI_1 !=., absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_NSC_type, append keep(L.cum_area L.NSC_high_cum_area) nocon label tex(frag) ct(BEV Sales) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_PHEV0 (L.cum_count L.NSC_high_cum_count = ghi_1 L.ghi_1 NSC_high_ghi_1 L.NSC_high_ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore if NSC_rate_CPI_1 !=., absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_NSC_type, append keep(L.cum_count L.NSC_high_cum_count) nocon label tex(frag) ct(PHEV Sales) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe sales_PHEV0 (L.cum_area L.NSC_high_cum_area = ghi_1 L.ghi_1 NSC_high_ghi_1 L.NSC_high_ghi_1) hov_length price_gasoline station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore if NSC_rate_CPI_1 !=., absorb(zcta county_year) cluster(zcta)
outreg2 using result_solar_on_EV_lag_NSC_type, append keep(L.cum_area L.NSC_high_cum_area) nocon label tex(frag) ct(PHEV Sales) addtext(County-Year FEs, YES, ZCTA FEs, YES) nonotes


////////////////////////////////
//////////*EV on PV*////////////
////////////////////////////////

/*Table 7*/

reghdfe count L.ownership_EV NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_first, replace keep(L.ownership_EV) nocon label tex(frag) ct(OLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
reghdfe area L.ownership_EV NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_first, append keep(L.ownership_EV) nocon label tex(frag) ct(OLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
reghdfe L.ownership_EV L.log_hov_length NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_first, append keep(L.log_hov_length) nocon label tex(frag) ct(First Stage) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
reghdfe L.ownership_EV L.price_gasoline NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_first, append keep(L.price_gasoline) nocon label tex(frag) ct(First Stage) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
reghdfe L.ownership_EV L.log_hov_length L.price_gasoline NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_first, append keep(L.log_hov_length L.price_gasoline) nocon label tex(frag) ct(First Stage) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes

/*Table 8*/

ivreghdfe count (L.ownership_EV = L.log_hov_length) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag, replace keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_EV = L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV = L.log_hov_length) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV = L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes

/*Table B4*/

ivreghdfe count (L.ownership_EV = L.price_gasoline) L.log_hov_length NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_test, replace keep(L.ownership_EV L.log_hov_length) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV = L.price_gasoline) L.log_hov_length NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_test, append keep(L.ownership_EV L.log_hov_length) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_EV = L.log_hov_length) L.price_gasoline NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_test, append keep(L.ownership_EV L.price_gasoline) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV = L.log_hov_length) L.price_gasoline NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_test, append keep(L.ownership_EV L.price_gasoline) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes

/*Table B5*/

ivreghdfe count (L.ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(fips)
outreg2 using result_EV_on_solar_lag_r, replace keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(fips)
outreg2 using result_EV_on_solar_lag_r, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_EV = L.log_hov_length L.price_gasoline), absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_r, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV = L.log_hov_length L.price_gasoline), absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_r, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore L.ghi L.station L.pop L.male L.age L.white L.highschool_more L.income_median L.income_15k L.income_25k L.income_35k L.income_50k L.income_75k L.income_100k L.income_150k L.income_200k L.income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_r, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore L.ghi L.station L.pop L.male L.age L.white L.highschool_more L.income_median L.income_15k L.income_25k L.income_35k L.income_50k L.income_75k L.income_100k L.income_150k L.income_200k L.income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_r, append keep(L.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe log_count (L.log_ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_r, append keep(L.log_ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe log_area (L.log_ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_r, append keep(L.log_ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe ihs_count (L.ihs_ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_r, append keep(L.ihs_ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe ihs_area (L.ihs_ownership_EV = L.log_hov_length L.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_r, append keep(L.ihs_ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes

/*Table B6*/

ivreghdfe count (L2.ownership_EV = L2.log_hov_length L2.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_more, replace keep(L2.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L2.ownership_EV = L2.log_hov_length L2.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_more, append keep(L2.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L3.ownership_EV = L3.log_hov_length L3.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_more, append keep(L3.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L3.ownership_EV = L3.log_hov_length L3.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_more, append keep(L3.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L4.ownership_EV = L4.log_hov_length L4.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_more, append keep(L4.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L4.ownership_EV = L4.log_hov_length L4.price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_more, append keep(L4.ownership_EV) nocon label tex(frag) ct(2SLS) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes

/*Table 11*/

gen station_one = station==1
gen station_two = station>1
gen station_one_log_hov_length = station_one*log_hov_length
gen station_one_price_gasoline = station_one*price_gasoline
gen station_one_ownership_EV = station_one*ownership_EV
gen station_two_log_hov_length = station_two*log_hov_length
gen station_two_price_gasoline = station_two*price_gasoline
gen station_two_ownership_EV = station_two*ownership_EV

bysort city year: egen station_city = sum(station)
bysort city year: egen station_1_city = sum(station_1)

tsset zcta year

gen station_one_city = station_city==1
gen station_two_city = station_city>1
gen station_one_city_log_hov_length = station_one_city*log_hov_length
gen station_one_city_price_gasoline = station_one_city*price_gasoline
gen station_one_city_ownership_EV = station_one_city*ownership_EV
gen station_two_city_log_hov_length = station_two_city*log_hov_length
gen station_two_city_price_gasoline = station_two_city*price_gasoline
gen station_two_city_ownership_EV = station_two_city*ownership_EV

ivreghdfe count (L.ownership_EV L.station_one_ownership_EV L.station_two_ownership_EV = L.log_hov_length L.price_gasoline L.station_one_log_hov_length L.station_one_price_gasoline L.station_two_log_hov_length L.station_two_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station, replace keep(L.ownership_EV L.station_one_ownership_EV L.station_two_ownership_EV) nocon label tex(frag) ct(Solar Installations) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV L.station_one_ownership_EV L.station_two_ownership_EV = L.log_hov_length L.price_gasoline L.station_one_log_hov_length L.station_one_price_gasoline L.station_two_log_hov_length L.station_two_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station, append keep(L.ownership_EV L.station_one_ownership_EV L.station_two_ownership_EV) nocon label tex(frag) ct(Solar Capacity) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_EV L.station_one_city_ownership_EV L.station_two_city_ownership_EV = L.log_hov_length L.price_gasoline L.station_one_city_log_hov_length L.station_one_city_price_gasoline L.station_two_city_log_hov_length L.station_two_city_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station, append keep(L.ownership_EV L.station_one_city_ownership_EV L.station_two_city_ownership_EV) nocon label tex(frag) ct(Solar Installations) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_EV L.station_one_city_ownership_EV L.station_two_city_ownership_EV = L.log_hov_length L.price_gasoline L.station_one_city_log_hov_length L.station_one_city_price_gasoline L.station_two_city_log_hov_length L.station_two_city_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station, append keep(L.ownership_EV L.station_one_city_ownership_EV L.station_two_city_ownership_EV) nocon label tex(frag) ct(Solar Capacity) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes

/*Table 12*/

gen station_one_ownership_electric = station_one*ownership_electric
gen station_two_ownership_electric = station_two*ownership_electric
gen station_one_ownership_PHEV = station_one*ownership_PHEV
gen station_two_ownership_PHEV = station_two*ownership_PHEV

gen station_one_city_ownership_BEV = station_one_city*ownership_electric
gen station_two_city_ownership_BEV = station_two_city*ownership_electric
gen station_one_city_ownership_PHEV = station_one_city*ownership_PHEV
gen station_two_city_ownership_PHEV = station_two_city*ownership_PHEV

ivreghdfe count (L.ownership_electric L.station_one_ownership_electric L.station_two_ownership_electric = L.log_hov_length L.price_gasoline L.station_one_log_hov_length L.station_one_price_gasoline L.station_two_log_hov_length L.station_two_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station_type_inter, replace keep(L.ownership_electric L.station_one_ownership_electric L.station_two_ownership_electric) nocon label tex(frag) ct(Solar Installations) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_electric L.station_one_ownership_electric L.station_two_ownership_electric = L.log_hov_length L.price_gasoline L.station_one_log_hov_length L.station_one_price_gasoline L.station_two_log_hov_length L.station_two_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station_type_inter, append keep(L.ownership_electric L.station_one_ownership_electric L.station_two_ownership_electric) nocon label tex(frag) ct(Solar Capacity) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_PHEV L.station_one_ownership_PHEV L.station_two_ownership_PHEV = L.log_hov_length L.price_gasoline L.station_one_log_hov_length L.station_one_price_gasoline L.station_two_log_hov_length L.station_two_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station_type_inter, append keep(L.ownership_PHEV L.station_one_ownership_PHEV L.station_two_ownership_PHEV) nocon label tex(frag) ct(Solar Installations) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_PHEV L.station_one_ownership_PHEV L.station_two_ownership_PHEV = L.log_hov_length L.price_gasoline L.station_one_log_hov_length L.station_one_price_gasoline L.station_two_log_hov_length L.station_two_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station_type_inter, append keep(L.ownership_PHEV L.station_one_ownership_PHEV L.station_two_ownership_PHEV) nocon label tex(frag) ct(Solar Capacity) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_electric L.station_one_city_ownership_BEV L.station_two_city_ownership_BEV = L.log_hov_length L.price_gasoline L.station_one_city_log_hov_length L.station_one_city_price_gasoline L.station_two_city_log_hov_length L.station_two_city_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station_type_inter, append keep(L.ownership_electric L.station_one_city_ownership_BEV L.station_two_city_ownership_BEV) nocon label tex(frag) ct(Solar Installations) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_electric L.station_one_city_ownership_BEV L.station_two_city_ownership_BEV = L.log_hov_length L.price_gasoline L.station_one_city_log_hov_length L.station_one_city_price_gasoline L.station_two_city_log_hov_length L.station_two_city_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station_type_inter, append keep(L.ownership_electric L.station_one_city_ownership_BEV L.station_two_city_ownership_BEV) nocon label tex(frag) ct(Solar Capacity) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe count (L.ownership_PHEV L.station_one_city_ownership_PHEV L.station_two_city_ownership_PHEV = L.log_hov_length L.price_gasoline L.station_one_city_log_hov_length L.station_one_city_price_gasoline L.station_two_city_log_hov_length L.station_two_city_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station_type_inter, append keep(L.ownership_PHEV L.station_one_city_ownership_PHEV L.station_two_city_ownership_PHEV) nocon label tex(frag) ct(Solar Installations) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
ivreghdfe area (L.ownership_PHEV L.station_one_city_ownership_PHEV L.station_two_city_ownership_PHEV = L.log_hov_length L.price_gasoline L.station_one_city_log_hov_length L.station_one_city_price_gasoline L.station_two_city_log_hov_length L.station_two_city_price_gasoline) NSC_rate ghi station pop male age white highschool_more income_median income_15k income_25k income_35k income_50k income_75k income_100k income_150k income_200k income_200kmore, absorb(zcta year) cluster(zcta)
outreg2 using result_EV_on_solar_lag_station_type_inter, append keep(L.ownership_PHEV L.station_one_city_ownership_PHEV L.station_two_city_ownership_PHEV) nocon label tex(frag) ct(Solar Capacity) addtext(Year FEs, YES, ZCTA FEs, YES) nonotes
